package com.lanou3g.practice;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * Created by dllo on 18/4/24.
 */
public class Server {
    public static void main(String[] args) {

        try {

            ServerSocket ss = new ServerSocket(7788);
            System.out.println("准备介入");
            while (true){
                Socket client = ss.accept();
                System.out.println("已连接一个设备"+ client.getRemoteSocketAddress());
                new EchoThread(client).start();
            }



        } catch (Exception e) {
            e.printStackTrace();
        }





    }
}
